﻿function OpenPage(url, w, h) {

    var iTop = (window.screen.availHeight - 30 - h) / 2;       //获得窗口的垂直位置;
    var iLeft = (window.screen.availWidth - 10 - w) / 2;           //获得窗口的水平位置;

    //window.showModalDialog(url, "", 'dialogWidth:' + w + 'px;dialogLeft:' + left + ';dialogTop:' + top + ';dialogHeight:' + h + 'px;toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no;');
    window.open(url, '', 'width=' + w + ',left=' + iLeft + ',top=' + iTop + ',height=' + h + 'px, toolbar=no, menubar=no, resizable=no,location=no, status=no, scrollbars=yes');
}